const express = require('express');

// 引入json模块
const data = require('./data.json');

const app = express();

app.get('/api/seller', (request, response) => {
    response.json({
        data: data.seller
    })
})
app.get('/api/goods', (request, response) => {
    response.json({
        data: data.goods
    })
})
app.get('/api/ratings', (request, response) => {
    response.json({
        data: data.ratings
    })
})

app.listen(8088, () => {
    console.log('服务器已经启动~~正在监听：http://localhost:8088')
})